import Vue from 'vue';
const state = Vue.observable({
  get token() {
    return localStorage.getItem('token')
  }
  set token(token) {
    localStorage.setItem('token', token)
  }
});
const mutations = {
  LOGIN(payload) {
    state.token = payload
  }
  LOGOUT() {
    state.token = ''
  }
}
const store = { state, mutations }

Vue.prototype.$store = store